package com.ruoyi.gis.service.impl;

import java.util.List;

import cn.hutool.core.util.IdUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gis.mapper.DatasetTypeResolvingMapper;
import com.ruoyi.gis.domain.DatasetTypeResolving;
import com.ruoyi.gis.service.IDatasetTypeResolvingService;

/**
 * 分辨率Service业务层处理
 *
 * @author rww
 * @date 2024-08-26
 */
@Service
public class DatasetTypeResolvingServiceImpl implements IDatasetTypeResolvingService
{
    @Autowired
    private DatasetTypeResolvingMapper datasetTypeResolvingMapper;

    /**
     * 查询分辨率
     *
     * @param id 分辨率主键
     * @return 分辨率
     */
    @Override
    public DatasetTypeResolving selectDatasetTypeResolvingById(String id)
    {
        return datasetTypeResolvingMapper.selectDatasetTypeResolvingById(id);
    }

    /**
     * 查询分辨率列表
     *
     * @param datasetTypeResolving 分辨率
     * @return 分辨率
     */
    @Override
    public List<DatasetTypeResolving> selectDatasetTypeResolvingList(DatasetTypeResolving datasetTypeResolving)
    {
        return datasetTypeResolvingMapper.selectDatasetTypeResolvingList(datasetTypeResolving);
    }

    /**
     * 新增分辨率
     *
     * @param datasetTypeResolving 分辨率
     * @return 结果
     */
    @Override
    public int insertDatasetTypeResolving(DatasetTypeResolving datasetTypeResolving)
    {
        datasetTypeResolving.setId(IdUtil.getSnowflakeNextIdStr());
        return datasetTypeResolvingMapper.insertDatasetTypeResolving(datasetTypeResolving);
    }

    /**
     * 修改分辨率
     *
     * @param datasetTypeResolving 分辨率
     * @return 结果
     */
    @Override
    public int updateDatasetTypeResolving(DatasetTypeResolving datasetTypeResolving)
    {
        return datasetTypeResolvingMapper.updateDatasetTypeResolving(datasetTypeResolving);
    }

    /**
     * 批量删除分辨率
     *
     * @param ids 需要删除的分辨率主键
     * @return 结果
     */
    @Override
    public int deleteDatasetTypeResolvingByIds(String[] ids)
    {
        return datasetTypeResolvingMapper.deleteDatasetTypeResolvingByIds(ids);
    }

    /**
     * 删除分辨率信息
     *
     * @param id 分辨率主键
     * @return 结果
     */
    @Override
    public int deleteDatasetTypeResolvingById(String id)
    {
        return datasetTypeResolvingMapper.deleteDatasetTypeResolvingById(id);
    }
}
